package com.todo.sight.application.iface.backend.request;

import com.todo.common.common.entity.CurrentStaff;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @author zhangwenxiang
 * @date 2024/3/17 15:48
 * @description
 */
@Data
@Schema(title = "新增景点信息入参", description = "新增景点信息入参")
public class InsertSightDetailReq {

    private CurrentStaff _staff;
    /**
     * 标题
     */
    @Schema(title = "标题", description = "标题")
    private String title;
    /**
     * 宣传口号
     */
    @Schema(title = "宣传口号", description = "宣传口号")
    private String slogan;
    /**
     * poi
     */
    @Schema(title = "poi", description = "poi")
    private Long poiId;
    /**
     * 评分
     */
    @Schema(title = "评分", description = "评分，存在则使用此数据")
    private Integer score;
    /**
     * 热度
     */
    @Schema(title = "热度", description = "热度，存在则使用此数据")
    private Integer hot;
    /**
     * 详细地址
     */
    @Schema(title = "详细地址", description = "详细地址")
    private String address;
    /**
     * 主图
     */
    @Schema(title = "主图", description = "主图")
    private String mainImg;
    /**
     * 是否展示
     */
    @Schema(title = "是否展示", description = "是否展示")
    private Integer isShow;
    /**
     * 是否营业
     */
    @Schema(title = "是否营业", description = "是否营业")
    private Integer isOpen;

    @Schema(title = "图片列表", description = "图片列表")
    private List<String> imgList;

    /**
     * 景点详情描述
     */
    @Schema(title = "景点详情描述", description = "景点详情描述")
    private String desc;
    /**
     * 门票信息
     */
    @Schema(title = "门票信息", description = "门票信息")
    private TicketInfo ticketInfo;
    /**
     * 开放时间
     */
    @Schema(title = "开放时间", description = "开放时间")
    private String openTime;
    /**
     * 游玩建议：须知、建议
     */
    @Schema(title = "游玩建议", description = "须知、建议")
    private Suggest suggest;


    @Data
    public static class TicketInfo {

        @Schema(title = "门票规则", description = "门票规则")
        private String ticketRule;

        @Schema(title = "门票统一售价", description = "门票统一售价")
        private String ticketPrice;

        @Schema(title = "门票折扣信息", description = "门票折扣信息")
        private String ticketDiscountInfo;
    }

    @Data
    public static class Suggest {

        @Schema(title = "游玩须知", description = "游玩须知")
        private String guide;

        @Schema(title = "游玩建议", description = "游玩建议")
        private String suggestInfo;

        @Schema(title = "出行限制", description = "出行限制")
        private String travelLimit;

        @Schema(title = "安全建议", description = "安全建议")
        private String securitySuggest;
    }

    public boolean baseCheck() {
        if (title == null || poiId == null || address == null || mainImg == null || isShow == null || isOpen == null || desc == null || openTime == null || ticketInfo == null || suggest == null) {
            return false;
        }
        return true;
    }
}
